import { Component, Input, OnInit,Output,EventEmitter } from '@angular/core';
import {NavController, NavParams } from 'ionic-angular';
import { TopicInfo } from "../../models/quesinfo";



/**
 * Generated class for the QuestioncheckboxPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */


@Component({
  selector: 'page-question-test-checkbox',
  templateUrl: 'question-test-checkbox.html',
})

export class QuestionTestCheckboxPage {

  @Input() topic:TopicInfo;
  @Input() poneSet: Array<any>;
  @Input()
  topicIndex;
  topicIndexshow;

  constructor(public navCtrl: NavController, public navParams: NavParams) {

  }

  @Output() emitId = new EventEmitter<object>();
  ngOnInit(): void {
    this.topicIndexshow=this.topicIndex+1;
    // this.topic["testCheckBox"] = [];
  }

  // che=[];
  // _che;
  // _chebox=[];
  // star;
  // checkboxdata(e,j){
  //   if(e.target.checked){
  //     this.che.push({j:e.target.value});
  //
  //   }else{
  //     for(var p=0;p<this.che.length;p++){
  //       if(this.che[p].j==e.target.value){
  //
  //         this.che.splice(p,1)
  //       }
  //     }
  //   }
  //   this._chebox=[];
  //   for(var i=0;i<this.che.length;i++){
  //     this._chebox.push(this.che[i].j);
  //   }
  //   this.topic["testCheckBox"]=this._chebox;
  //   // //console.log(this.topic["testCheckBox"])
  // }



}
